package ProjectTeam39.Domains;
/**
 * Date.java
 * Represents the date using the day of the month and month.
 * @author SeanPohjalainen
 * @version 1.0
 */
public class Date {
	/** the day of the month */
	private int day;
	/** the month */
	private Month month;
	/** the months of the year */
	public enum Month {
		JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER;
	}
	/** the days of the week */
	public enum Day {
		MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY;
	}
	
	public Date(){
		this(0, null);
	}
	
	/**
	 * Creates a date object.
	 * @param d the day of the month	
	 * @param m the month
	 */
	public Date(int d, Month m){
		this.day = d;
		this.month = m;
	}
	
	/**
	 * @return the day
	 */
	public int getDay(){
		return day;
	}
	
	/**
	 * @return the month
	 */
	public Month getMonth(){
		return month;
	}
	
	/**
	 * Set the day
	 * @param d
	 */
	public void setDay(int d){
		this.day = d;
	}
	
	/** 
	 * Set the month
	 * @param m
	 */
	public void setMonth(Month m){
		this.month = m;
	}
	
	/**
	 * Convert the date into a String
	 * @return the date as a String
	 */
	public String toString(){
		String str = new String();
		switch(month){
		case JANUARY: str = "January";
		case FEBRUARY: str = "February";
		case MARCH: str = "March";
		case APRIL: str = "April";
		case MAY: str = "May";
		case JUNE: str = "June";
		case JULY: str = "July";
		case AUGUST: str = "August";
		case SEPTEMBER: str = "September";
		case OCTOBER: str = "October";
		case NOVEMBER: str = "November";
		case DECEMBER: str = "December";
		}
		return (Integer.toString(day) +" "+ str);
	}
}
